#include "pch.h"
#include "Directory.h"

void GetTargetPath(int argc, char* argv[] , std::string &targetPath)
{
    for (int i = 0; i < argc - 1; i++)
    {
        std::string arg = argv[i];
        if (arg == "-d")
        {
            targetPath = argv[i + 1];
        }
    }
};


void GenerateExportCpp(const std::vector<FileSystem::File> &headerFiles){


};

int main(int argc, char *argv[])
{
    // FileSystem::Directory d1("./");
    // LOGI("d1 fullPath is %s", d1.GetAbsolutePath().c_str());
    // LOGI("d1 Relative Parent Path is %s", d1.GetRelativeParentPath().c_str());
    // LOGI("d1 Absolute Parent Path is %s", d1.GetAbsoluteParentPath().c_str());
    // auto childFiles = d1.GetChildrenFiles();

    // for (const auto &childFile : childFiles)
    // {
    //     LOGI("child File is %s Suffix is %s ", childFile.GetPath().c_str(), childFile.GetSuffix().c_str());
    // }

    // std::string targetPath;
    // GetTargetPath(argc, argv, targetPath);
    // LOGD("target path is %s ", targetPath.c_str());

    // FileSystem::Directory d1(targetPath);
    // auto headerFiles = d1.GetChildrenFilesSuffix(".h");

    // LOGD("size is %d", headerFiles.size());

    FileSystem::Path p1("../build/main");
    // LOGI("ext", p1.GetExtension().c_str());

    // p1.MakePrefered();

    // LOGI("is %s", p1.m_Path.c_str());

    fs::path p2("..\\build/main");
    fs::path p3 = p2.make_preferred();
    LOGI("is %s ", p3.string().c_str());

    FileSystem::Directory d1("../build");

    std::string demo1 = "../demo1";
    d1.CopyTo(demo1);
    // d1.RemoveAll();

    FileSystem::Directory d2(demo1);
    d2.RemoveAll();


    return 0;
}